define
(    
    ["Data/DocumentService", "SessionInfo"],
    function(DocumentService, SessionInfo)
    {
        return function(io)
        {            
            var _docService = new DocumentService().getInstance(io);
            var _sessions = {};            

            this.handleSocketEvents = function(socket)
            {
                updateSocketInformation(socket);
                _docService.handleSocketEvents(socket);
            };

            function updateSocketInformation(socket)
            {
                var sessionId = socket.handshake.sessionID;
                _sessions[sessionId] = _sessions[sessionId] || new SessionInfo(socket.id);                
            }            
        };        
    }
);